package com.avic.modules.equipment.service;

import com.avic.common.service.BaseService;
import com.avic.modules.equipment.domain.Equipment;
import com.avic.modules.equipment.service.dto.EquipmentDto;
import com.avic.modules.equipment.service.dto.EquipmentQueryCriteria;
import org.springframework.data.domain.Pageable;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * @author zhangzikang 设备表
 * @date 2022-08-14
 */
public interface EquipmentService extends BaseService<Equipment> {

    /**
     * 查看设备全部信息 分页
     * @param criteria
     * @param pageable
     * @return
     */
    Map<String,Object> queryAll(EquipmentQueryCriteria criteria, Pageable pageable);

    /**
     * 查看设备全部信息 不分页
     * @param criteria
     * @return
     */
    List<Equipment> queryAll(EquipmentQueryCriteria criteria);

    /**
     *
     * @param criteria
     * @param pageable
     * @return
     */
    List<Equipment> queryAlls(EquipmentQueryCriteria criteria,Pageable pageable);

    /**
     * 导出设备信息
     * @param all
     * @param response
     */
    void download(List<EquipmentDto> all, HttpServletResponse response) throws IOException;

    /**
     * 导出设备健康状态信息
     * @param all
     * @param response
     */
    void export(List<EquipmentDto> all, HttpServletResponse response) throws IOException;

    /**
     * 导出设备运行状态
     * @param all
     * @param response
     * @throws IOException
     */
    void FunctionExport(List<EquipmentDto> all, HttpServletResponse response) throws IOException;
    /**
     * 添加设备信息
     * @param equipment
     */
    void addEquipment(Equipment equipment);

    /**
     * 修改设备信息
     * @param equipment
     */
    void editEquipment(Equipment equipment);

    /**
     * 查询所有设备
     * @param equipment
     * @return
     */
    List<Equipment> seeEquip(List<Equipment> equipment);

    /**
     * 导入设备台账信息
     * @param file
     */
    void equipImport(MultipartFile file);
}
